<%@page import="java.util.Iterator"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.Collection"%>
<%@page import="DAO.TesinaDAO"%>
<%@page import="DAO.FactoryDAO"%>
<%@page import="modelo.Tesina"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="sj" uri="/struts-jquery-tags"%>


<table class="tabla">
	<%
		Collection<Tesina> collTesis = new ArrayList<Tesina>();
		TesinaDAO tesinaDAO = FactoryDAO.getTesinaDAO();
		collTesis = tesinaDAO.obtenerUltimasTesinas();
		int cant = collTesis.size();
		Iterator<Tesina> Itesinas = collTesis.iterator();
		for (int i = 0; i < collTesis.size(); i++) {
	%><tr>
		<%
			for (int k = 0; k < 3; k++) {
					if (cant > 0) {
						if (Itesinas.hasNext()) {
							Tesina tesina = (Tesina) Itesinas.next();
		%>
		<td><s:url id="IdTesina" namespace="/"
				action="cargarVerTesinaFront">
				<s:param name="id_tesis"><%=tesina.getId()%></s:param>
			</s:url> <sj:div id="column1" cssClass="column">
				<div
					class="ui-widget ui-widget-content ui-helper-clearfix ui-corner-all">
					<div class="ui-widget-header ui-corner-all">
						<span class="title"><s:a href="%{IdTesina}">
								<%=tesina.getTitulo()%>
							</s:a>
						</span>
					</div>
					<div class="portlet-content" style="overflow: auto; height: 100px">
						<%=tesina.getResumen()%>
					</div>
				</div>
			</sj:div></td>
		<%
			cant--;

						}
					}
				}
			}
		%>
	</tr>

</table>